const Koa = require('koa')
const app = new Koa();
// 引入插件
const { koaBody } = require('koa-body')
// 引入路由
const upload = require('./router/upload')


// 使用插件
app.use(koaBody({
  multipart: true
}))
// 挂载路由
app.use(upload.routes()).use(upload.allowedMethods())

app.listen(7001, () => console.log('server is running at port 7001'))